
export function isExternal(path) {
  return /^(https?:|mailto:|tel:)/.test(path)
}

export function isPhone(value) {
  return /^1[3-9][0-9]{9}$/.test(value)
}

export function isPass(value) {
  return /^[\w]{6,16}$/.test(value)
}

export function isCode(value) {
  return /^\d{6}$/.test(value)
}

export function isIdCard(value) {
  return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(value)
}